﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MongoDB.Bson.Serialization.Attributes;
using System.ComponentModel.DataAnnotations;

namespace MongoServices.Example.Models.DomainModels
{
	[MongoCollectionName("Post")]
	[BsonIgnoreExtraElements]
	public class BlogPostShort : MongoServicesExampleModel
	{
		[Required(ErrorMessage="Title is required.")]
		public string Title { get; set; }

		public DateTime DatePosted { get; set; }

		public string BodyShort { get; set; }

		public BlogPostShort()
		{
			DatePosted = DateTime.Now;
		}
	}
}